package com.bing.my.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bing.my.entity.GooseBill;
import com.bing.my.mapper.GooseBillMapper;
import com.bing.my.service.GooseBillService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 商品账数据 服务实现类
 * </p>
 *
 * @author bing
 * @since 2021-10-26
 */
@Service
public class GooseBillServiceImpl extends ServiceImpl<GooseBillMapper, GooseBill> implements GooseBillService {

    @Resource
    private GooseBillMapper gooseBillMapper;
    @Override
    public int insert(GooseBill gooseBill) {
        return gooseBillMapper.insert(gooseBill);
    }

    @Override
    public List<GooseBill> inquireGooseBill(String billId) {
        QueryWrapper<GooseBill> wrapper = new QueryWrapper<>();
        List<GooseBill> gooseBills = gooseBillMapper.selectList(wrapper.eq("bill_id", billId));
        return gooseBills;

    }
}
